// mock/user.bundled_88spfk92fz7.bundled_5n1xhjtj0xf.mjs
var SUCCESS_MESSAGE = "\u63A5\u53E3\u8FDE\u63A5\u6B63\u5E38";
var ERROR_MESSAGE = "\u63A5\u53E3\u5F02\u5E38";
var userList = [
  {
    name: "admin",
    password: "admin",
    dept: 1,
    depaName: "\u7BA1\u7406\u5458",
    sex: "male",
    id: 1,
    token: "123456"
  },
  {
    name: "\u5F20\u4E09",
    password: "zs",
    dept: 2,
    depaName: "\u6D4B\u8BD5",
    sex: "male",
    id: 2,
    token: "123456"
  },
  {
    name: "\u674E\u56DB",
    password: "ls",
    dept: 2,
    depaName: "\u6D4B\u8BD5",
    sex: "male",
    id: 3,
    token: "123456"
  }
];
var user_default = [
  {
    url: "/api/login",
    method: "post",
    response: ({ body }) => {
      const { userName, password } = body;
      const userInfo = userList.find((item) => item.name === userName && item.password === password);
      if (!userInfo) {
        return { code: 201, data: {}, message: "\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF" };
      }
      return { code: 200, data: userInfo, message: SUCCESS_MESSAGE };
    }
  },
  {
    url: "/api/getList",
    method: "post",
    response: (req) => {
      return {
        code: 200,
        data: userList
      };
    }
  },
  {
    url: "/api/getUserInfo",
    method: "get",
    response: ({ query }) => {
      const { id } = query.id;
      if (id) {
        const userInfo = userList.find((item) => item.id === id);
        if (userInfo) {
          return { code: 200, data: userInfo, message: SUCCESS_MESSAGE };
        }
        return { code: 201, data: {}, message: ERROR_MESSAGE };
      }
      return { code: 201, data: {}, message: ERROR_MESSAGE };
    }
  }
];
export {
  user_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibW9jay9tb2NrL21vY2svdXNlci5qcyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiY29uc3QgX19pbmplY3RlZF9maWxlbmFtZV9fID0gXCJEOlxcXFxcdTUyNERcdTdBRUZcXFxcdnVlM19kZW1vXFxcXG15LXZ1ZTMtdml0Z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3QnLFxyXG4gICAgICAgIHJlc3BvbnNlOiAocmVxKSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2RlOiAyMDAsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiB1c2VyTGlzdFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG4gICAge1xyXG4gICAgICAgIHVybDogJy9hcGkvZ2V0VXNlckluZm8nLFxyXG4gICAgICAgIG1ldGhvZDogJ2dldCcsXHJcbiAgICAgICAgcmVzcG9uc2U6ICh7IHF1ZXJ5IH0pID0+IHtcclxuXHJcbiAgICAgICAgICAgIGNvbnN0IHsgaWQgfSA9IHF1ZXJ5LmlkO1xyXG4gICAgICAgICAgICBpZiAoaWQpIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHVzZXJJbmZvID0gdXNlckxpc3QuZmluZChpdGVtID0+IGl0ZW0uaWQgPT09IGlkKTtcclxuICAgICAgICAgICAgICAgIGlmICh1c2VySW5mbykge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNvZGU6IDIwMCwgZGF0YTogdXNlckluZm8sIG1lc3NhZ2U6IFNVQ0NFU1NfTUVTU0FHRSB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4geyBjb2RlOiAyMDEsIGRhdGE6IHt9LCBtZXNzYWdlOiBFUlJPUl9NRVNTQUdFIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4geyBjb2RlOiAyMDEsIGRhdGE6IHt9LCBtZXNzYWdlOiBFUlJPUl9NRVNTQUdFIH1cclxuXHJcbiAgICAgICAgfSxcclxuICAgIH0sXHJcbl07XHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFDQSxJQUFNLGtCQUFrQjtBQUN4QixJQUFNLGdCQUFnQjtBQUN0QixJQUFNLFdBQVc7RUFDYjtJQUNJLE1BQU07SUF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